﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Kokomo.Mirror.Ia32
{
	public class ImmediateOperand : SimpleOperand
	{
		public ImmediateOperand(
			OperandSize size,
			ulong value
			)
			:base(size)
		{
			this.Value = value;
		}

		public override bool Equals(object obj)
		{
			ImmediateOperand other = obj as ImmediateOperand;
			if (other == null) return false;

			bool equal = (other.Value == this.Value);
			return equal;
		}

		public override int GetHashCode()
		{
			return this.Value.GetHashCode();
		}

		public override string ToString()
		{
			return string.Format("0{0:X}h", this.Value);
		}

		public ulong Value { get; private set; }
	}
}
